<?php

define('_RACE_UNDEFINED_', 0);
define('_RACE_NECRO_', 1);
define('_RACE_ACADEMY_', 2);
define('_RACE_HAVRE_', 3);
define('_RACE_INFERNO_', 4);

function unit_list_sort($a, $b)
{
    if ($a[0] == $b[0]) {
        return 0;
    }
    return ($a[0] < $b[0]) ? -1 : 1;
}

$_UNIT_LIST = array(
    array("",0,0,0,_RACE_UNDEFINED_),
    array("Squelette",87,INFANTRY,1,_RACE_NECRO_),
    array("Archer Squelette",70,ARCHER,1,_RACE_NECRO_),
    array("Zombie",134,INFANTRY,2,_RACE_NECRO_),
    array("Zombie Pestilentiel",160,INFANTRY,2,_RACE_NECRO_),
    array("Fantôme",303,CAVALRY,3,_RACE_NECRO_),
    array("Spectre",364,CAVALRY,3,_RACE_NECRO_),
    array("Vampire",751,INFANTRY,4,_RACE_NECRO_),
    array("Seigneur Vampire",902,INFANTRY,4,_RACE_NECRO_),
    array("Liche",1430,ARCHER,5,_RACE_NECRO_),
    array("Archiliche",2144,ARCHER,5,_RACE_NECRO_),
    array("Revenant",2578,INFANTRY,6,_RACE_NECRO_),
    array("Apparition",3365,INFANTRY,6,_RACE_NECRO_),
    array("Dragon Squelette",5866,CAVALRY,7,_RACE_NECRO_),
    array("Dragon Spectral",8213,CAVALRY,7,_RACE_NECRO_),

    array("Gremlin",71,ARCHER,1,_RACE_ACADEMY_),
    array("Ingénieur Gremlin",86,ARCHER,1,_RACE_ACADEMY_),
    array("Gargouille de Pierre",120,CAVALRY,2,_RACE_ACADEMY_),
    array("Gargouille d'Obsidienne",144,CAVALRY,2,_RACE_ACADEMY_),
    array("Golem de Fer",272,INFANTRY,3,_RACE_ACADEMY_),
    array("Golem d'Acier",327,INFANTRY,3,_RACE_ACADEMY_),
    array("Mage",674,ARCHER,4,_RACE_ACADEMY_),
    array("Archimage",809,ARCHER,4,_RACE_ACADEMY_),
    array("Djinn",1317,CAVALRY,5,_RACE_ACADEMY_),
    array("Sultan Djinn",1994,CAVALRY,5,_RACE_ACADEMY_),
    array("Rani Rakshasa",2242,INFANTRY,6,_RACE_ACADEMY_),
    array("Raja Rakshasa",2950,INFANTRY,6,_RACE_ACADEMY_),
    array("Géant",5850,INFANTRY,7,_RACE_ACADEMY_),
    array("Titan",8190,ARCHER,7,_RACE_ACADEMY_),

    array("Paysan",97,INFANTRY,1,_RACE_HAVRE_),
    array("Conscrit",128,INFANTRY,1,_RACE_HAVRE_),
    array("Archer",198,ARCHER,2,_RACE_HAVRE_),
    array("Arbalétrier",263,ARCHER,2,_RACE_HAVRE_),
    array("Fantassin",407,INFANTRY,3,_RACE_HAVRE_),
    array("Champion",488,INFANTRY,3,_RACE_HAVRE_),
    array("Griffon",751,CAVALRY,4,_RACE_HAVRE_),
    array("Griffon Impérial",902,CAVALRY,4,_RACE_HAVRE_),
    array("Prêtre",1747,ARCHER,5,_RACE_HAVRE_),
    array("Inquisiteur",2575,ARCHER,5,_RACE_HAVRE_),
    array("Cavalier",3188,CAVALRY,6,_RACE_HAVRE_),
    array("Paladin",4508,CAVALRY,6,_RACE_HAVRE_),
    array("Ange",7150,INFANTRY,7,_RACE_HAVRE_),
    array("Archange",10010,INFANTRY,7,_RACE_HAVRE_),

    array("Diablotin",71,INFANTRY,1,_RACE_INFERNO_),
    array("Familier",86,ARCHER,1,_RACE_INFERNO_),
    array("Démon Cornu",163,INFANTRY,2,_RACE_INFERNO_),
    array("Tyran Cornu",196,INFANTRY,2,_RACE_INFERNO_),
    array("Chien des enfers",370,CAVALRY,3,_RACE_INFERNO_),
    array("Cerbère",445,CAVALRY,3,_RACE_INFERNO_),
    array("Succube",918,ARCHER,4,_RACE_INFERNO_),
    array("Maîtresse Succube",1101,ARCHER,4,_RACE_INFERNO_),
    array("Cheval Infernal",1795,CAVALRY,5,_RACE_INFERNO_),
    array("Destrier de Cauchemar",2668,CAVALRY,5,_RACE_INFERNO_),
    array("Fiélon des Abîmes",2946,ARCHER,6,_RACE_INFERNO_),
    array("Seigneur des Abîmes",3816,ARCHER,6,_RACE_INFERNO_),
    array("Diable",6825,INFANTRY,7,_RACE_INFERNO_),
    array("Archidiable",9555,INFANTRY,7,_RACE_INFERNO_));
$_UNIT_LIST_SORTED = $_UNIT_LIST;
usort($_UNIT_LIST_SORTED, 'unit_list_sort');
?>


